<%@ page import="ut.data.User" %>
<%@ page contentType="text/html;charset=utf-8" %>
<%
	User user = (User)session.getAttribute("user");
%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="Description" content="UT終極一翻聯絡表單，填寫表單以聯絡本站的服務人員。" />
	<title>UT終極一翻！ | 聯絡我們</title>
	<link rel="stylesheet" type="text/css" href="/style.css" media="all" />
	<link rel="stylesheet" type="text/css" href="/css/task-create.css" media="all" />
	<script type="text/javascript" src="/js/Utility.js"></script>
	<script type="text/javascript" src="/js/Message.js"></script>
	<script type="text/javascript" src="/js/Ajax.js"></script>
	<script type="text/javascript" src="/js/Button.js"></script>
	<script type="text/javascript" src="/js/Account.js"></script>
	<script type="text/javascript" src="/script.js"></script>
</head>
<body onload="init();">
<%@ include file="/include/banner.jsp" %>
	<div class="content">
		<div class="title">聯絡我們</div>
<%
	if(user == null){
%>
		<div class="block-center">請先登入會員，再與我們連繫。</div>
		<form class="create-form block" style="width:60%;" onsubmit="contact(this);return false;">
			<div class="create-content">
				<div class="create-element">
					<div class="create-element-left" style="width:20%;">名稱：</div>
				</div>
				<div class="create-element">
					<div class="create-element-left" style="width:20%;">
						主旨：<br/>
						<span class="mark-red comment">＊限 30 字元</span>
					</div>
					<div class="create-element-right" style="width:80%;">
						<input type="text" name="subject" style="width:99%" disabled />
					</div>
				</div>
				<div class="create-element">
					<div class="create-element-left" style="width:20%;">
						內文：<br/>
						<span class="mark-red comment">＊限 255 字元</span>
					</div>
					<div class="create-element-right" style="width:80%;">
						<textarea type="text" name="content" style="height:150px;" disabled></textarea>
					</div>
				</div>
				<div style="text-align:center;clear:both;">
					<input name="submit" type="submit" class="button" value="送出" disabled
						onmousedown="this.style.borderStyle='inset';"
						onmouseup="this.style.borderStyle='outset';"
						onmouseout="this.style.borderStyle='outset';" />
				</div>
			</div>
		</form>
<%
	}else{
%>
		<div class="block-center">請填寫以下表單與我們連繫</div>
		<form class="create-form block" style="width:60%;" onsubmit="contact(this);return false;">
			<div class="create-content">
				<div class="create-element">
					<div class="create-element-left" style="width:20%;">名稱：</div>
					<div class="create-element-right" style="width:80%;">
						<%= user.name %>
					</div>
				</div>
				<div class="create-element">
					<div class="create-element-left" style="width:20%;">
						主旨：<br/>
						<span class="mark-red comment">＊限 30 字元</span>
					</div>
					<div class="create-element-right" style="width:80%;">
						<input type="text" name="subject" style="width:99%" />
					</div>
				</div>
				<div class="create-element">
					<div class="create-element-left" style="width:20%;">
						內文：<br/>
						<span class="mark-red comment">＊限 255 字元</span>
					</div>
					<div class="create-element-right" style="width:80%;">
						<textarea type="text" name="content" style="height:150px;"></textarea>
					</div>
				</div>
				<div style="text-align:center;clear:both;">
					<input name="submit" type="submit" class="button" value="送出"
						onmousedown="this.style.borderStyle='inset';"
						onmouseup="this.style.borderStyle='outset';"
						onmouseout="this.style.borderStyle='outset';" />
				</div>
			</div>
		</form>
<%
	}
%>
<%@ include file="/include/foot.jsp" %>
	</div>
</body>
</html>